home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.MDIForm MDIForm1
- BackColor = &H8000000C&
- Caption = "Mabry Software"
- ClientHeight = 6795
- ClientLeft = 2145
- ClientTop = 3195
- ClientWidth = 9480
- Height = 7200
- Icon = "mlist4.frx":0000
- Left = 2085
- LinkTopic = "MDIForm1"
- Top = 2850
- Width = 9600
- Begin VB.PictureBox Title
- Align = 1 'Align Top
- BorderStyle = 0 'None
- Height = 525
- Left = 0
- ScaleHeight = 525
- ScaleWidth = 9480
- TabIndex = 0
- Top = 0
- Width = 9480
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = "List/X+ Sample Program"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 18
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 465
- Left = 1560
- TabIndex = 1
- Top = 30
- Width = 7935
- End
- End
- Begin VB.PictureBox ButtonBar
- Align = 3 'Align Left
- BorderStyle = 0 'None
- Height = 6270
- Left = 0
- ScaleHeight = 6270
- ScaleWidth = 1515
- TabIndex = 2
- Top = 525
- Width = 1515
- Begin VB.PictureBox Buttons
- BorderStyle = 0 'None
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 555
- Index = 4
- Left = 0
- ScaleHeight = 555
- ScaleWidth = 1575
- TabIndex = 7
- Top = 2490
- Width = 1575
- End
- Begin VB.PictureBox Buttons
- BorderStyle = 0 'None
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 555
- Index = 3
- Left = 0
- ScaleHeight = 555
- ScaleWidth = 1575
- TabIndex = 6
- Top = 2280
- Width = 1575
- End
- Begin VB.PictureBox Buttons
- BorderStyle = 0 'None
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 555
- Index = 2
- Left = 0
- ScaleHeight = 555
- ScaleWidth = 1575
- TabIndex = 5
- Top = 1335
- Width = 1575
- End
- Begin VB.PictureBox Buttons
- BorderStyle = 0 'None
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 555
- Index = 1
- Left = 0
- ScaleHeight = 555
- ScaleWidth = 1575
- TabIndex = 4
- Top = 765
- Width = 1575
- End
- Begin VB.PictureBox Buttons
- BorderStyle = 0 'None
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 13.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 555
- Index = 0
- Left = 0
- ScaleHeight = 555
- ScaleWidth = 1575
- TabIndex = 3
- Top = 240
- Width = 1575
- End
- End
- Attribute VB_Name = "MDIForm1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
- Private Declare Function ReleaseCapture Lib "user32" () As Long
- Private m_hascapture As Integer
- Private m_mousedown As Boolean
- Private m_selectedform As Integer
- Private Sub LoadForm(f As Form)
- f.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
- ' f.WindowState = 2
- f.Show
- f.ZOrder 0
- End Sub
- Private Sub Buttons_Click(Index As Integer)
- Dim i As Integer
- m_hascapture = -1
- If (Index = m_selectedform) Then
- Exit Sub
- End If
- If (m_selectedform <> -1) Then
- i = m_selectedform
- m_selectedform = -1
- Buttons(i).Refresh
- End If
- m_selectedform = Index
- Select Case (Index)
- Case 0
- LoadForm frmOwnDraw
- Case 1
- LoadForm frmColumns
- Case 2
- LoadForm frmThreedFX
- Case 3
- LoadForm frmColors
- Case 4
- LoadForm frmSort
- End Select
- End Sub
- Private Sub Buttons_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
- m_mousedown = True
- Buttons(Index).Refresh
- End Sub
- Private Sub Buttons_MouseMove(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
- If (m_hascapture <> Index) Then
- Call SetCapture(Buttons(Index).hwnd)
- m_hascapture = Index
- Buttons(Index).Refresh
- Else
- If (x < 0 Or y < 0 Or x > Buttons(Index).ScaleWidth Or y > Buttons(Index).ScaleHeight) Then
- Call ReleaseCapture
- m_hascapture = -1
- Buttons(Index).Refresh
- End If
- End If
- End Sub
- Private Sub Buttons_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
- m_mousedown = False
- Buttons(Index).Refresh
- End Sub
- Private Sub Buttons_Paint(Index As Integer)
- Dim s As String
- Dim factive As Boolean
- If (Index = m_hascapture) Then
- factive = True And Not m_mousedown
- Else
- factive = False
- End If
- Select Case Index
- Case 0
- s = "Draw!"
- Case 1
- s = "Columns"
- Case 2
- s = "3D Effects"
- Case 3
- s = "Colors"
- Case 4
- s = "Sorting"
- End Select
- If (Index = m_selectedform) Then
- Buttons(Index).ForeColor = RGB(0, 0, 255)
- Else
- Buttons(Index).ForeColor = RGB(0, 0, 128)
- End If
- Buttons(Index).CurrentX = (Buttons(Index).ScaleWidth - Buttons(Index).TextWidth(s)) / 2
- Buttons(Index).CurrentY = (Buttons(Index).ScaleHeight - Buttons(Index).TextHeight(s)) / 2
- Buttons(Index).Print s
- If (factive) Then
- Draw3DRect Buttons(Index), 0, 0, Buttons(Index).Width, Buttons(Index).height, Not factive
- End If
- End Sub
- Private Sub MDIForm_Load()
- Dim i As Integer
-
- If (Screen.Width > MDIForm1.Width) Then
- MDIForm1.Left = (Screen.Width - MDIForm1.Width) / 2
- Else
- MDIForm1.Left = 0
- End If
- If (Screen.height > MDIForm1.height) Then
- MDIForm1.Top = (Screen.height - MDIForm1.height) / 5
- Else
- MDIForm1.Top = 0
- End If
- Buttons(0).Top = 0
- Buttons(0).Left = 0
- Buttons(0).Width = ButtonBar.Width
- For i = 1 To 4
- Buttons(i).Top = Buttons(i - 1).Top + Buttons(i - 1).height
- Buttons(i).Left = 0
- Buttons(i).Width = ButtonBar.Width
- Buttons(i).height = Buttons(i - 1).height
- Next
- m_hascapture = -1
- m_selectedform = -1
- Me.Show
- DoEvents
- Buttons_Click 0
- Buttons_Paint 0
- Buttons(0).SetFocus
- End Sub
-